package cn.wolfcode.p2p.base.domain;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import cn.wolfcode.base.BaseDomain;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 用户登录信息
 *
 * @author
 * @since 2018-11-21 17:09:16
 */
@Getter
@Setter
@Accessors(chain = true)
public class LoginInfo extends BaseDomain {


    public static final int STATE_NORMAL = 0; //正常
    public static final int STATE_LOCK = 1; // 锁定
    public static final int TYPE_USER = 0; // 前台
    public static final int TYPE_MANAGER = 1; // 后台
    /**
     * 登录账号
     */
    @NotEmpty(message = "手机号码不能为空!")
    private String username;

    /**
     * 登录密码
     */
    @NotNull(message = "密码不能为空")
    private String password;

    /**
     * 用户状态(正常/锁定)
     */
    private Integer state = STATE_NORMAL;

    /**
     * 用户类型(前台用户/后台用户)
     */
    private Integer userType = TYPE_USER;

    /**
     * 是否是客服
     */
    private Boolean customServiceId = Boolean.FALSE;
}